3.355 \(\int \frac {1}{a x+b x^n} \, dx\)

Optimal. Leaf size=23 \[ \frac {\log \left (a x^{1-n}+b\right )}{a (1-n)} \]

[Out]

ln(b+a*x^(1-n))/a/(1-n)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1593, 260} \[ \frac {\log \left (a x^{1-n}+b\right )}{a (1-n)} \]

Antiderivative was successfully verified.

[In]

Int[(a*x + b*x^n)^(-1),x]

[Out]

Log[b + a*x^(1 - n)]/(a*(1 - n))

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps

\begin {align*} \int \frac {1}{a x+b x^n} \, dx &=\int \frac {x^{-n}}{b+a x^{1-n}} \, dx\\ &=\frac {\log \left (b+a x^{1-n}\right )}{a (1-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 23, normalized size = 1.00 \[ \frac {\log \left (a x^{1-n}+b\right )}{a (1-n)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a*x + b*x^n)^(-1),x]

[Out]

Log[b + a*x^(1 - n)]/(a*(1 - n))

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 27, normalized size = 1.17 \[ \frac {n \log \relax (x) - \log \left (a x + b x^{n}\right )}{a n - a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x+b*x^n),x, algorithm="fricas")

[Out]

(n*log(x) - log(a*x + b*x^n))/(a*n - a)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{a x + b x^{n}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x+b*x^n),x, algorithm="giac")

[Out]

integrate(1/(a*x + b*x^n), x)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 36, normalized size = 1.57 \[ \frac {n \ln \relax (x )}{\left (n -1\right ) a}-\frac {\ln \left (a x +b \,{\mathrm e}^{n \ln \relax (x )}\right )}{\left (n -1\right ) a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a*x+b*x^n),x)

[Out]

n/a/(n-1)*ln(x)-1/a/(n-1)*ln(a*x+b*exp(n*ln(x)))

________________________________________________________________________________________

maxima [A]  time = 1.42, size = 37, normalized size = 1.61 \[ \frac {n \log \relax (x)}{a {\left (n - 1\right )}} - \frac {\log \left (\frac {a x + b x^{n}}{b}\right )}{a {\left (n - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x+b*x^n),x, algorithm="maxima")

[Out]

n*log(x)/(a*(n - 1)) - log((a*x + b*x^n)/b)/(a*(n - 1))

________________________________________________________________________________________

mupad [B]  time = 5.26, size = 26, normalized size = 1.13 \[ -\frac {\ln \left (b\,x^n+a\,x\right )-n\,\ln \relax (x)}{a\,\left (n-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b*x^n + a*x),x)

[Out]

-(log(b*x^n + a*x) - n*log(x))/(a*(n - 1))

________________________________________________________________________________________

sympy [A]  time = 0.68, size = 53, normalized size = 2.30 \[ \begin {cases} \tilde {\infty } \log {\relax (x )} & \text {for}\: a = 0 \wedge b = 0 \wedge n = 1 \\- \frac {x}{b \left (n x^{n} - x^{n}\right )} & \text {for}\: a = 0 \\\frac {\log {\relax (x )}}{a + b} & \text {for}\: n = 1 \\\frac {\log {\relax (x )}}{a} & \text {for}\: b = 0 \\\frac {n \log {\relax (x )}}{a n - a} - \frac {\log {\left (\frac {a x}{b} + x^{n} \right )}}{a n - a} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x+b*x**n),x)

[Out]

Piecewise((zoo*log(x), Eq(a, 0) & Eq(b, 0) & Eq(n, 1)), (-x/(b*(n*x**n - x**n)), Eq(a, 0)), (log(x)/(a + b), E
q(n, 1)), (log(x)/a, Eq(b, 0)), (n*log(x)/(a*n - a) - log(a*x/b + x**n)/(a*n - a), True))

________________________________________________________________________________________